/* Integration points (quadratures)
   Jukka Toivanen, Jan Stebel
*/

#include "linpoint.h"





template<>
void LinPoint<3>::setGSF()
{
  GSF(0,0) = -1;
  GSF(0,1) =  1;
  GSF(0,2) =  0;
  GSF(0,3) =  0;
  GSF(1,0) = -1;
  GSF(1,1) =  0;
  GSF(1,2) =  1;
  GSF(1,3) =  0;
  GSF(2,0) = -1;
  GSF(2,1) =  0;
  GSF(2,2) =  0;
  GSF(2,3) =  1;
}

template<>
void LinPoint<3>::setSF()
{
  SF(0,0) = 1-ksi[0]-ksi[1]-ksi[2];
  SF(1,0) = ksi[0];
  SF(2,0) = ksi[1];
  SF(3,0) = ksi[2];
}





template<>
void LinPoint<2>::setSF()
{
  SF(0,0) = 1-ksi[0]-ksi[1];
  SF(1,0) = ksi[0];
  SF(2,0) = ksi[1];
}

template<>
void LinPoint<2>::setGSF()
{
  GSF(0,0) = -1;
  GSF(0,1) = 1;
  GSF(0,2) = 0;
  GSF(1,0) = -1;
  GSF(1,1) = 0;
  GSF(1,2) = 1;
}





template<>
void LinPoint<1>::setSF()
{
  SF(0,0) = 0.5*(1.0-ksi[0]);
  SF(1,0) = 0.5*(1.0+ksi[0]);
}

template<>
void LinPoint<1>::setGSF()
{
  GSF(0,0) = -0.5;
  GSF(0,1) = 0.5;
}
















template class LinPoint<1>;
template class LinPoint<2>;
template class LinPoint<3>;
template class LinPointOnQuadMesh<1>;
template class LinPointOnQuadMesh<2>;
template class LinPointOnQuadMesh<3>;
